<?php
declare(strict_types=1);

namespace App\Controller;

use App\Request\UserOperation\CoinCheckRequest;
use App\Service\UserOperation\CoinBaseService;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\Middleware;
use App\Middleware\JTAuthMiddleware;

/**
 * @Controller(prefix="check")
 */
class CheckController extends AbstractController
{
    /**
     * 检测金币的操作(充值 礼物消费)
     * @RequestMapping(path="coinOperation", methods="post")
     * @Middleware(JTAuthMiddleware::class)
     */
    public function coinOperation(CoinCheckRequest $request, CoinBaseService $service)
    {
        $request->validated();

        return $service->response();
    }
}